import unittest
import requests

from api.IhrmLogin import IhrmLoginApi
from common.IhrmTest import TestScript
from parameterized import parameterized

from common.Json_Touple import DataJson
from config import BASE_DIR


class TestIhrmLogin(unittest.TestCase):

    path=BASE_DIR + "/data/LoginJsonData.json"

    @parameterized.expand(DataJson(path))
    def test01_login(self,url,json_data,scode,success,code,message):
        resp = IhrmLoginApi.login(url,json_data)
        TestScript(self,resp,scode,success,code,message)

